<template>
  <views class="invoice_look">
    <viewTitle :title="'开票信息'" :border="false"></viewTitle>
    <div class="invoice_infor">    
           <table>
                <tbody>
                       <tr>
                           <td>发票抬头</td>
                           <td>{{data.enterprise_name}}</td>
                           <td>发票金额</td>
                           <td>￥{{data.money}}</td>
                       </tr>
                       <tr>
                           <td>税务登记证号</td>
                           <td>{{data.enterprise_code}}</td>
                           <td>注册电话</td>
                           <td>{{data.receiver_mobile}}</td>
                       </tr>
                       <tr>
                           <td>注册地址</td>
                           <td>{{data.receiver_address}}</td>
                           <td>开户银行</td>
                           <td>{{data.bank_name}}</td>
                       </tr>
                       <tr>
                           <td>开户帐号</td>
                           <td>{{data.bank_sn}}</td>
                           <td></td>
                           <td></td>
                       </tr>                                                                     
                </tbody>
           </table>                 
    </div>
  </views>
</template>
<script>
export default {
  data() {
    return {
        data:{}
    };
  },
  methods: {
      getData(){
          if(this.$store.state.terrace==1){
              this.getEnterpriseData();
          }
          if(this.$store.state.terrace==3){
              this.getFacilitatorData();
          }
      },
      getEnterpriseData(){
          let {code , msg, data} = this.$api.sendSync(this.$mapapi.egetInvoiceDetail, {
              enterprise_invoice_id:this.$route.query.enterprise_invoice_id||0
          });
          if(code != 200&&code!=501){
              this.$message.error(msg);
              return;
          }
          this.data= data;
      },
      getFacilitatorData(){
          let {code , msg, data} = this.$api.sendSync(this.$mapapi.finvoiceDetail, {
              enterprise_invoice_id:this.$route.query.enterprise_invoice_id||0
          });
          if(code != 200&&code!=501){
              this.$message.error(msg);
              return;
          }
          this.data= data;
      }
  },
  mounted() {
     this.$setRouteTitle();
     this.getData()
  },
  created() {}
};
</script>


<style lang="less"  :scope="true"  src="@/style/invoice/invoice_look.less" >
</style>